gtkcssshadowvalue: Don't double-apply the alpha to shadows
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 31 Jul 2014 16:27:46 +0000 (18:27 +0200)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 2 Aug 2014 22:58:19 +0000 (18:58 -0400)
commit9f2e0902f63f6af6c8d2b96dd4efcb52b70b451e
tree999e0f6e25e80f76589ea2f9b4ac3ee55c906b73
parent1c34ad26680d8bb9e45ff0d28c8d5763b15dea86
gtkcssshadowvalue: Don't double-apply the alpha to shadows

It turns out that when we were painting the shadows, we painted the them
with the base color once, which contained the alpha, and then blurred it
and used it as a mask for the fill, which has the fill again.

To fix this, always paint the base surface with full alpha. The existing
code applies the blur conditionally sometimes in weird ways, so the code
shuffling fix may not look correct, but be assured it is. If the blur
happens, the new cr we return has the *default* color applied, which is
fully opaque black, which works perfectly against the A8 surface.

The fallback spinner code needs some modification, since it is
intentionally using the alpha to paint the lobes which are "in the past".
Since we shouldn't be hitting this fallback path very often, we use a
temporary group and paint it with paint_with_alpha, even though it is
slow.
gtk/gtkcssshadowvalue.c
gtk/gtkthemingengine.c
gtk/gtkthemingengineprivate.h